From 4d3fb38bff424fff2bee93922e7a244a87015c22 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 22 Oct 2015 12:56:03 -0600 Subject: [PATCH] Properly make LinksUpdate be recursive when done from job queue New enqueue method of DeferredUpdates was turning LinksUpdate updates into Jobs. However RefreshLinksJob was not properly reconstructing the secondary updates as being recursive (if they were recursive). This means that templates weren't having the pages that were using them being updated. See also related T116001. Change-Id: Ia06246efb2034fdfe07232fd8c2334160edbcf02 --- includes/deferred/LinksUpdate.php | 3 ++- includes/jobqueue/jobs/RefreshLinksJob.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/deferred/LinksUpdate.php b/includes/deferred/LinksUpdate.php index 5a7efca152..fa09b37a24 100644 --- a/includes/deferred/LinksUpdate.php +++ b/includes/deferred/LinksUpdate.php @@ -996,7 +996,8 @@ class LinksUpdate extends SqlDataUpdate implements EnqueueableDataUpdate { array( 'prioritize' => true, // Reuse the parser cache if it was saved - 'rootJobTimestamp' => $this->mParserOutput->getCacheTime() + 'rootJobTimestamp' => $this->mParserOutput->getCacheTime(), + 'useRecursiveLinksUpdate' => $this->mRecursive ), array( 'removeDuplicates' => true ), $this->getTitle() diff --git a/includes/jobqueue/jobs/RefreshLinksJob.php b/includes/jobqueue/jobs/RefreshLinksJob.php index 7093e14e98..1d59b324be 100644 --- a/includes/jobqueue/jobs/RefreshLinksJob.php +++ b/includes/jobqueue/jobs/RefreshLinksJob.php @@ -197,7 +197,8 @@ class RefreshLinksJob extends Job { } } - $updates = $content->getSecondaryDataUpdates( $title, null, false, $parserOutput ); + $updates = $content->getSecondaryDataUpdates( + $title, null, !empty( $this->params['useRecursiveLinksUpdate'] ), $parserOutput ); foreach ( $updates as $key => $update ) { if ( $update instanceof LinksUpdate && isset( $this->params['triggeredRecursive'] ) ) { $update->setTriggeredRecursive(); -- 2.20.1